package com.barneyx.mshinfoplatform.exception;

import com.barneyx.mshinfoplatform.common.ExResult;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
public class MshException extends Exception {
    private ExResult.ResponseCode code;
    private String msg;

    public MshException(ExResult.ResponseCode code) {
        super(code.getMessage());
        this.code = code;
    }

    public MshException(String msg) {
        super(msg);
        this.msg = msg;
        this.code = null;
    }


}
